#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;

int main ()
{
  char str[] ="hello hello world world! Nihao";
  char * pch;
  pch = strtok (str," ,.-");
  vector<char*> vec;
  vec.push_back(pch);
  while (true)
  {
    pch = strtok (NULL, " ");
	if (pch==NULL) break;
	vector<char*>::iterator v=vec.begin();
	bool flag=false;
	while (v!=vec.end()) {
		if (!strcmp(*v,pch)) {
			flag=true;
			break;
		}
		++v;
	}
	if (!flag) vec.push_back(pch);
  }
  printf("%d",vec.size());
  scanf("%d");
  return 0;
}